package ooday01;

public class CarTest {
    public static void main(String[] args) {
        Car car1=new Car();//创建了一个对象并调用了一个无参的构造方法
        car1.brand="特斯拉";//对象调用了brand并给它赋值
        car1.price=2;
        car1.color="黑";
        car1.start();
        car1.run();
        car1.stop();

        Car car2=new Car("玛莎拉蒂","粉",1);//创建了一个
        car2.start();
        car2.run();
        car2.stop();

        Car car3=new Car("奔驰","白",20);
        car3.start();
        car3.run();
        car3.stop();
    }
}
